Optimal. Leaf size=50 \[ \frac {a (2 A-B) \tan (c+d x)}{3 d}+\frac {(A+B) \sec ^3(c+d x) (a \sin (c+d x)+a)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2855, 3767, 8} \[ \frac {a (2 A-B) \tan (c+d x)}{3 d}+\frac {(A+B) \sec ^3(c+d x) (a \sin (c+d x)+a)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2855
Rule 3767
Rubi steps
\begin {align*} \int \sec ^4(c+d x) (a+a \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}+\frac {1}{3} (a (2 A-B)) \int \sec ^2(c+d x) \, dx\\ &=\frac {(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}-\frac {(a (2 A-B)) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d}\\ &=\frac {(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}+\frac {a (2 A-B) \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.63, size = 97, normalized size = 1.94 \[ \frac {a \sec (c) (\sin (c+d x)+1) \sec ^3(c+d x) (-2 (A+B) \cos (c+d x)+A \sin (2 (c+d x))+4 A \cos (c+2 d x)+8 A \sin (d x)+B \sin (2 (c+d x))-2 B \cos (c+2 d x)+6 B \cos (c)-4 B \sin (d x))}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 69, normalized size = 1.38 \[ -\frac {{\left (2 \, A - B\right )} a \cos \left (d x + c\right )^{2} + {\left (2 \, A - B\right )} a \sin \left (d x + c\right ) - {\left (A - 2 \, B\right )} a}{3 \, {\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 94, normalized size = 1.88 \[ -\frac {\frac {3 \, {\left (A a - B a\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1} + \frac {9 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7 \, A a + B a}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.52, size = 72, normalized size = 1.44 \[ \frac {\frac {a A}{3 \cos \left (d x +c \right )^{3}}+\frac {a B \left (\sin ^{3}\left (d x +c \right )\right )}{3 \cos \left (d x +c \right )^{3}}-a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+\frac {a B}{3 \cos \left (d x +c \right )^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 59, normalized size = 1.18 \[ \frac {B a \tan \left (d x + c\right )^{3} + {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a + \frac {A a}{\cos \left (d x + c\right )^{3}} + \frac {B a}{\cos \left (d x + c\right )^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.25, size = 107, normalized size = 2.14 \[ \frac {\frac {2\,a\,\left (\frac {3\,B}{2}+A\,\cos \left (c+d\,x\right )+B\,\cos \left (c+d\,x\right )+2\,A\,\sin \left (c+d\,x\right )-B\,\sin \left (c+d\,x\right )+A\,\cos \left (2\,c+2\,d\,x\right )-\frac {B\,\cos \left (2\,c+2\,d\,x\right )}{2}\right )}{3}-\frac {4\,a\,\cos \left (c+d\,x\right )\,\left (\frac {A}{2}+\frac {B}{2}\right )}{3}}{d\,\left (2\,\cos \left (c+d\,x\right )-\sin \left (2\,c+2\,d\,x\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int A \sec ^{4}{\left (c + d x \right )}\, dx + \int A \sin {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sin {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sin ^{2}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________